package com.example.alipay_10_3.controller;

import com.example.alipay_10_3.Vo.Price;
import com.example.alipay_10_3.server.UnionPayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UnionPayController {
    @Autowired
    private UnionPayService unionPayService;

    @RequestMapping("/unionpay")
    @ResponseBody
    public String pay(@RequestBody Price price){
        String pay = unionPayService.pay(price);
        return pay;
    }
}
